#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      shoo
#
# Created:     12/06/2011
# Copyright:   (c) shoo 2011
# Licence:     <your licence>
#-------------------------------------------------------------------------------

from google.appengine.ext import db

# グローバル設定情報
class Conf(db.Model):
    dwUser = db.StringProperty(required=True)
    dwPasswd = db.StringProperty(required=True)
    sender = db.StringProperty(required=True)
    to = db.StringProperty(required=True)
    last_id = db.IntegerProperty(required=True)
    image_link = db.BooleanProperty()
    subject_prefix = db.StringProperty()
    subject_suffix = db.StringProperty()

# 設定情報を取得する
def getConf():
    conf = db.GqlQuery("SELECT * FROM Conf ").get()
    if conf:
        return conf
    conf = Conf(dwUser=" ", dwPasswd=" ", sender=" ", to=" ", last_id=0, image_link=True, subject_prefix="", subject_suffix="")
    conf.put()
    return conf

def main():
    pass

if __name__ == '__main__':
    main()
